﻿#include "answeritem.h"
#include <QMessageBox>

AnswerItem::AnswerItem(QString qLabel,QStringList answers):m_qLabel(qLabel),m_answers(answers)
{
    this->m_items_count=0;
    this->m_isSingal=true;
    if(answers.size()>1)
    {
        this->m_isSingal=false;
    }

}

QString AnswerItem::getqLabel() const
{
    return m_qLabel;
}

void AnswerItem::setItems(const QString &item)
{
    for(int i=0;i<this->m_items.size();i++)
    {
        if(this->m_items[i]==item)
        {
            return;
        }
    }
    this->m_items.append(item);
    this->m_items_count++;
}

const QVector<QString> &AnswerItem::getItems()
{
    return this->m_items;
}

const QStringList &AnswerItem::getAnswers()
{
    return this->m_answers;
}

int AnswerItem::getNum() const
{
    return this->m_items_count;
}

bool AnswerItem::getIsSignal() const
{
    return this->m_isSingal;
}
